Wraps a nkMaths::Quaternion and offers functions for use in scripting.
More...
Wraps a nkMaths::Quaternion and offers functions for use in scripting.
◆ updateEnvironment()
static void nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::updateEnvironment |
( |
nkScripts::Environment * |
env | ) |
|
|
static |
Updates a given environment and set it up to use all functions wrapped by this wrapper.
- Parameters
-
env | The environment to set up. |
◆ constructor()
static void* nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::constructor |
( |
const nkScripts::DataStack & |
stack | ) |
|
|
static |
Wrapper function for the constructor of the user type.
local t = nkMaths.Quaternion.new() ;
- Parameters
-
stack | The parameter stack. |
- Returns
- An output value with the user type and data allocated.
◆ destructor()
static void nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::destructor |
( |
void * |
toDestroy | ) |
|
|
static |
Wrapper function for the destructor of the user type.
- Parameters
-
toDestroy | The data that has to be freed. |
◆ getX()
Wrapper function for the nkMaths::Quaternion::getX(), exposed as an attribute getter.
local d = q.x ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getY()
Wrapper function for the nkMaths::Quaternion::getY(), exposed as an attribute getter.
local d = q.y ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getZ()
Wrapper function for the nkMaths::Quaternion::getZ(), exposed as an attribute getter.
local d = q.z ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ getW()
Wrapper function for the nkMaths::Quaternion::getW(), exposed as an attribute getter.
local d = q.w ;
- Parameters
-
vector | The data from which the attribute will be retrieved. |
- Returns
- The attribute value, as a float.
◆ setX()
static void nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::setX |
( |
const nkScripts::DataStack & |
stack | ) |
|
|
static |
Wrapper function for nkMaths::Quaternion::setX(), exposed as an attribute setter.
q.x = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setY()
static void nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::setY |
( |
const nkScripts::DataStack & |
stack | ) |
|
|
static |
Wrapper function for nkMaths::Quaternion::setY(), exposed as an attribute setter.
q.y = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setZ()
static void nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::setZ |
( |
const nkScripts::DataStack & |
stack | ) |
|
|
static |
Wrapper function for nkMaths::Quaternion::setZ(), exposed as an attribute setter.
q.z = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setW()
static void nkAstraeus::lua::nkMathsWrap::QuaternionWrapper::setW |
( |
const nkScripts::DataStack & |
stack | ) |
|
|
static |
Wrapper function for nkMaths::Quaternion::setW(), exposed as an attribute setter.
q.w = 0.2 ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ applyToVec()
Wrapper function for nkMaths::Vector::operator*=() with a quaternion.
q:applyToVec(v) ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, empty.
◆ setFromAxisAngle()
◆ setFromEuler()
◆ toString()
Overrides the default string conversion function.
print(q) ;
- Parameters
-
stack | The parameter stack. |
- Returns
- The output value, as a string.
The documentation for this class was generated from the following file: